package com.foreverwin.mes.lims.service.impl;

import com.foreverwin.mes.core.base.FrontPage;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.foreverwin.mes.lims.model.InactiveTimeItem;
import com.foreverwin.mes.lims.mapper.InactiveTimeItemMapper;
import com.foreverwin.mes.lims.service.InactiveTimeItemService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 * 呆滞时间设置明细 服务实现类
 * </p>
 *
 * @author Max
 * @since 2020-03-09
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class InactiveTimeItemServiceImpl extends ServiceImpl<InactiveTimeItemMapper, InactiveTimeItem> implements InactiveTimeItemService {


    @Autowired
    private InactiveTimeItemMapper inactiveTimeItemMapper;

    @Override
    public Page<InactiveTimeItem> selectPage(FrontPage<InactiveTimeItem> frontPage, InactiveTimeItem inactiveTimeItem) {
        EntityWrapper<InactiveTimeItem> queryWrapper = new EntityWrapper<>();
        queryWrapper.setEntity(inactiveTimeItem);
        return super.selectPage(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<InactiveTimeItem> selectList(InactiveTimeItem inactiveTimeItem) {
        EntityWrapper<InactiveTimeItem> queryWrapper = new EntityWrapper<>();
        queryWrapper.setEntity(inactiveTimeItem);
        return super.selectList(queryWrapper);
    }


}